

//TODO a(17)
function a17(module, exports, a) {
    function i() {
        var e = new Date;
        return e.getFullYear() + "/" + (e.getMonth() + 1) + "/" + e.getDate() + " " + e.getHours() + ":" + e.getMinutes() + ":" + e.getSeconds()
    }

    var s = a(3), r = a(6), n = function (e, t) {
        this.playerVersion = e, this.header = [encodeURIComponent("<p>Letv Log(H5播放器日志)<br>playerVersion: " + this.playerVersion + ";UA: " + navigator.userAgent + ";Date: " + i() + "</p>")], this.logs = [], this.flag = !1, this.times = 0, t && this.showSendBtn()
    };
    n.prototype = {
        send: function (e) {
            e = e || {}, (this.flag || e.forceSend) && (this.pushLog("send Log"), s.ajax({
                url: "http://v.stat.letv.com/vplay/apis/feedback.php",
                type: "post",
                data: {
                    from: "web",
                    errno: e.errno || "",
                    data: "playerVersion=" + this.playerVersion + "&url=" + location.href + "&errno=" + e.errno,
                    phone: e.phone || "",
                    email: e.email || "letvH5",
                    content: e.forceSend ? "userSend" : "letvH5",
                    log: this.header.concat(this.logs).join("")
                }
            }))
        }, pushLog: function (e) {
            if ("object" == typeof e && (e = s.JSONTOStr(e)), /timeupdate/i.test(e)) {
                if (++this.times > 3)return
            } else this.times = 0;
            this.logs.push(encodeURIComponent("<p>[" + i() + "] " + e + "</p>"))
        }, clearLog: function () {
            this.logs.length = 1
        }, showSendBtn: function () {
            var e = document.createElement("button");
            e.id = "btnSend", e.setAttribute("style", "position: fixed; left: 0px; bottom: 0px; z-index: 9999; width:200px;height:100px;font-size:32px"), e.innerHTML = "上报", document.getElementsByTagName("body").item(0).appendChild(e), r(e).on("click", function () {
                var e = prompt("请输入您的联系方式");
                this.send({forceSend: !0, phone: e})
            }, this)
        }
    }, module.exports = n
}

